package com.zxcl.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

/**
 * 描述: []
 * 作者: zxcl
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WxOfficialModel {

    @JsonProperty("touser")
    private String toUser;

    @JsonProperty("template_id")
    private String templateId;

    private String url;

    @JsonProperty("topcolor")
    private String topColor;

    private Map<String, Map<String, String>> data;

    public static Map<String, String> build(String value, String color) {
        HashMap<String, String> map = new HashMap<>(4);
        map.put("value", value);
        map.put("color", color);
        return map;
    }
}
